package com.wframe.project.jnd.services;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import com.frame.database.JdataBean;
import com.wframe.project.jnd.rest.util.ClientException;

public interface UserService {
    JdataBean registerByPhone(String mobile, String pwd, String smscode, int source) throws Exception;

    JdataBean registerByAccount(String loginname, String mobile, String pwd, String smscode, int source) throws Exception;

    JdataBean registerByAccount(String loginname, String phone, String pwd, int source) throws Exception;

    enum UserSourceEnum {
        OTHER,
        PC,
        WECHAT,
		BACKSTAGE
    }

	public JdataBean login(String loginname,String pwd,String checkcode,HttpSession session)  throws Exception;
	public JdataBean login(String loginname,String pwd,String checkcode,boolean bindWechat,HttpSession session)  throws Exception;
	public void wxLoginOutwe(String wechat_openid,String userid) throws Exception;
	public JdataBean loginByUser(JdataBean user,HttpSession session) throws Exception;
	public JdataBean registerByPhone(String phone,String pwd,String smscode)  throws Exception;
	public JdataBean registerByAccount(String loginname,String phone,String pwd,String smscode)  throws Exception;
	public JdataBean registerByAccount(String loginname,String phone,String pwd)  throws Exception;
	public JdataBean getUser(String id);
	public JdataBean getquerywbuser(String id);
	public JdataBean getUserByAccount(String account);
	public void editUser(JdataBean bean) throws Exception;
	public void changephone(String oldphone,String newphone,String oldsmscode,String newsmscode,HttpSession session) throws Exception;
	public void updatePwd(String oldpwd,String newpwd,HttpSession session) throws Exception;
	public JdataBean getUserCompany(String userid);
	public String saveCompany(JdataBean bean) throws Exception;
	public String createUserCode();
	public List<Map> queryCompanyQul(String comid);
	public JdataBean checkloginname(String name) throws ClientException;
	public void findpwd(String userid,String phone,String smscode,String newpwd) throws Exception;
	public void addBrowse(String userid,int type,int dataid) throws Exception;
	public boolean checkUserAuth(String userid);
	public JdataBean statUserPro(String userid, int source) throws Exception;
	public void writefeedback(JdataBean bean) throws Exception;
	public void PCFeedback(JdataBean bean) throws Exception;

	public JdataBean getquerywbsign(String userid);
	public void saveSignRecord(JdataBean bean) throws Exception;
//	public void updateIntegral(String userid,int integral) throws Exception;
	public JdataBean queryToday(String userid);
	public JdataBean querysigncount(String userId);


	public void bindPhone(String phone, String smscode, HttpSession session)throws Exception;

	public JdataBean getUserByWechat(String openid,String unionid);

}
